/* GUI CONVERTED from rsiq02.p (converter v1.75) Sat Aug 12 23:14:05 2000 */
/* rsiq02.p - Release Management Supplier Schedules                         */
/* Copyright 1986-2002 QAD Inc., Carpinteria, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.             */
/*F0PN*/ /*V8:ConvertMode=Report                                            */
/*K1Q4*/ /*V8:RunMode=Character,Windows                                     */
/* REVISION: 7.0    LAST MODIFIED: 01/29/92           BY: WUG *F110*        */
/* REVISION: 7.3    LAST MODIFIED: 10/13/92           BY: WUG *G462*        */
/* REVISION: 7.4    LAST MODIFIED: 09/29/93           BY: WUG *H142*        */
/* REVISION: 7.4    LAST MODIFIED: 04/25/95           BY: dpm *H0CX*        */
/* REVISION: 7.3    LAST MODIFIED: 10/05/95           BY: vrn *G0YF*        */
/* REVISION: 8.5    LAST MODIFIED: 02/28/96     BY: *J0CV* Brandy J Ewing   */

/* REVISION: 8.6E     LAST MODIFIED: 02/23/98   BY: *L007* A. Rahane */
/* REVISION: 8.6E     LAST MODIFIED: 05/20/98   BY: *K1Q4* Alfred Tan       */
/* REVISION: 8.6E     LAST MODIFIED: 10/04/98   BY: *J314* Alfred Tan       */
/* REVISION: 9.0      LAST MODIFIED: 11/12/98   BY: *K1QY* Pat McCormick    */
/* REVISION: 9.0      LAST MODIFIED: 03/13/99   BY: *M0BD* Alfred Tan       */
/* REVISION: 9.1      LAST MODIFIED: 03/24/00 BY: *N08T* Annasaheb Rahane */
/* REVISION: 9.1      LAST MODIFIED: 08/12/00 BY: *N0KP* myb                */
         /* HISTORICAL SCHEDULE INQUIRY */


/*GUI preprocessor directive settings */
&SCOPED-DEFINE PP_GUI_CONVERT_MODE REPORT

         {mfdtitle.i "b+ "}

/* ********** Begin Translatable Strings Definitions ********* */

&SCOPED-DEFINE rsiq02_p_1 "Created After"
/* MaxLen: Comment: */

/* ********** End Translatable Strings Definitions ********* */

         define variable schtype like sch_type initial 4.
/*K1QY*/ define variable sch_type_desc  as  character format "x(24)"
/*K1QY*/                             no-undo.
/*K1QY*/ define variable sch_type_numonic as  character format "x(8)"
/*K1QY*/                             no-undo.
/*K1QY*/ define variable use_ship_sched like mfc_logical no-undo.
         define variable sch_recid as recid.
         define variable crt_after as date label {&rsiq02_p_1}.
/*H0CX*/ define variable impexp   like mfc_logical no-undo.
/*H0CX*/ define variable impexp_label as character format "x(8)" no-undo.

/*G0YF*/ 
/*GUI preprocessor Frame A define */
&SCOPED-DEFINE PP_FRAME_NAME A

FORM /*GUI*/ 
/*G0YF*/    
 RECT-FRAME       AT ROW 1 COLUMN 1.25
 RECT-FRAME-LABEL AT ROW 1 COLUMN 3 NO-LABEL VIEW-AS TEXT SIZE-PIXELS 1 BY 1
 SKIP(.1)  /*GUI*/
{rsprmfrm.i}
/*K1QY*/    skip(1) schtype colon 20
/*K1QY*/    space (3) sch_type_desc no-label
/*G0YF*/ with frame a width 80 attr-space side-labels NO-BOX THREE-D /*GUI*/.

 DEFINE VARIABLE F-a-title AS CHARACTER INITIAL "".
 RECT-FRAME-LABEL:SCREEN-VALUE in frame a = F-a-title.
 RECT-FRAME-LABEL:HIDDEN in frame a = yes.
 RECT-FRAME:HEIGHT-PIXELS in frame a =
  FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.
 RECT-FRAME:WIDTH-CHARS IN FRAME a = FRAME a:WIDTH-CHARS - .5.  /*GUI*/

/*GUI preprocessor Frame A undefine */
&UNDEFINE PP_FRAME_NAME



/* SET EXTERNAL LABELS */
setFrameLabels(frame a:handle).

/*G0YF* {rsordfrm.i} */

         repeat:
/*K1QY*/    /* CHECK FLAG TO SEE IF MODULE IS TURNED ON */
/*K1QY*/    if can-find (first mfc_ctrl where
/*K1QY*/       mfc_field = "enable_shipping_schedules"
/*K1QY*/       and mfc_seq = 4 and mfc_module = "ADG"
/*K1QY*/       and mfc_logical = yes)
/*K1QY*/       then
/*K1QY*/          assign
/*K1QY*/                schtype = 5
/*K1QY*/                use_ship_sched = yes.

/*K1QY*/     {gplngn2a.i
              &file     = ""sch_mstr""
              &field    = ""sch_type""
              &code     = string(schtype)
              &mnemonic = sch_type_numonic
              &label    = sch_type_desc}
/*K1QY*/      if not available lngd_det then
/*K1QY*/        {mfmsg.i 4211 3} /* Invalid Type */
/*K1QY*/      else
/*K1QY*/        display sch_type_desc
/*K1QY*/                schtype with frame a.
            {rsgetord.i old}

            update
/*K1QY**      schtype   */
/*K1QY*/      schtype when (use_ship_sched)
              skip(1)
              crt_after colon 17
              with frame a.

/*K1QY**  get translation text from code  */
/*K1QY*/     {gplngn2a.i
              &file     = ""sch_mstr""
              &field    = ""sch_type""
              &code     = string(schtype)
              &mnemonic = sch_type_numonic
              &label    = sch_type_desc}
/*K1QY*/      if not available lngd_det
/*K1QY*/      then do:
/*K1QY*/        {mfmsg.i 4211 3} /* Invalid Type */
/*K1QY*/        if (c-application-mode = 'WEB') then
/*K1QY*/          return.
/*K1QY*/        else
/*K1QY*/          undo, retry.
/*K1QY*/      end. /* do */
/*K1QY*/      else do:
/*K1QY*/        assign sch_type_desc = lngd_translation.
/*K1QY*/        display sch_type_desc with frame a.
/*K1QY*/      end. /* else do */
/*K1QY*/      if can-find (first mfc_ctrl where
/*K1QY*/         mfc_field = "enable_shipping_schedules"
/*K1QY*/         and mfc_seq = 4 and mfc_module = "ADG"
/*K1QY*/         and mfc_logical = yes)
/*K1QY*/         then do:
/*K1QY*/         if schtype = 4
/*K1QY*/            then
/*K1QY*/               {mfmsg.i 4377 2}. /* PRO/PLUS Supplier Schedules in use */
/*K1QY*/         end. /* do */

            {mfselprt.i "terminal" 80}
/*GUI*/ RECT-FRAME:HEIGHT-PIXELS in frame a = FRAME a:HEIGHT-PIXELS - RECT-FRAME:Y in frame a - 2.


            hide frame a.

            for each sch_mstr where sch_type = schtype
            and sch_nbr = pod_nbr and sch_line = pod_line
            and (sch_cr_date >= crt_after or crt_after = ?):
               
/*GUI*/ {mfguichk.i } /*Replace mfrpchk*/

               {gprun.i ""rsiq1a.p"" "(input sch_type,
                                       input sch_nbr,
                                       input sch_line,
                                       input sch_rlse_id,
                                       input no,
                                       input no)"} /*J0CV*/ /* NEW INPUT */
            end.

            {mfreset.i}
/*GUI*/ {mfgrptrm.i} /*Report-to-Window*/

            {mfmsg.i 8 1}
         end.
